// @Author miaoqing
// @Date 2024/03/28 15:15:00
// @Desc
package logic

import "core/command"

func (player *Player) registerHandler() {
}

func (mgr *RoomManager) registerRMHandler() {
	mgr.router.Register(uint16(command.Command_CSCreateRoom_Frame), mgr.createRoomHandler)
	mgr.router.Register(uint16(command.Command_CSRoomSrvPacket_Frame), mgr.roomSrvPacketHandler)
}

func (rm *Room) registerRoomHandler() {
	rm.router.Register(uint16(command.Command_CSJoinRoom_Frame), rm.joinRoomHandler)
	rm.router.Register(uint16(command.Command_CSExitRoom_Frame), rm.exitRoomHandler)
	rm.router.Register(uint16(command.Command_CSJoinGame_Frame), rm.joinGameHandler)
	rm.router.Register(uint16(command.Command_CSExitGame_Frame), rm.exitGameHandler)
	rm.router.Register(uint16(command.Command_CSReadyGame_Frame), rm.readyGameHandler)
	rm.router.Register(uint16(command.Command_CSStartGame_Frame), rm.startGameHandler)
	rm.router.Register(uint16(command.Command_CSInputFrameInfo_Frame), rm.inputFrameHandler)
}
